﻿using CPPEI.WebApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XWeb.WebApi.App
{
    [PostAction("user", "logout", "1.0")]
    public class logoutAction : BaseAction<logoutParams, logoutResult>
    {
        protected override ActionResult<logoutResult> OnExecute(ActionContext context, SysParams sysParams, logoutParams opParams)
        {
            logoutResult actResult = new logoutResult();
            CPPEI.WebApi.Config.Current.AuthProvider.Delete();
            return new ActionResult<logoutResult>(actResult);
        }
    }

    public class logoutParams
    {
    }

    public class logoutResult
    {
    }
}
